package ttsolver.enums;

public enum OptSense {
	MINIMIZE (1300),
	MAXIMIZE (1301),
	UNKNOWN (1399);
	
	private int id;

	private OptSense(int id) {
		this.id = id;
	}

	public int getId() {
		return id;
	}
	
	public static OptSense valueOf(int id) {
		for (OptSense stat : OptSense.values())
			if ( stat.getId() == id )
				return stat;
		return null;
	}
	
	public static OptSense parse(String name) {
		for (OptSense stat : OptSense.values())
			if ( stat.name().equalsIgnoreCase(name) )
				return stat;
		return null;
	}
}
